package cn.edu.scau.cmi.chensixiao.javaFX;

import cn.edu.scau.cmi.chensixiao.client.AbstractFactoryClient;
import cn.edu.scau.cmi.chensixiao.client.AdapterClient;
import cn.edu.scau.cmi.chensixiao.client.CompositeClient;
import cn.edu.scau.cmi.chensixiao.client.FactoryClient;
import cn.edu.scau.cmi.chensixiao.client.HibernateClient;
import cn.edu.scau.cmi.chensixiao.client.MultipletonClient;
import cn.edu.scau.cmi.chensixiao.client.SingletonClient;
import cn.edu.scau.cmi.chensixiao.client.simpleFactoryClient;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.stage.Stage;

public class ComprehensionController {

	@FXML
	private Button singletonButton;
	@FXML
	private Button multitonButton;
	@FXML
	private Button simpleFactoryMethodButton;
	@FXML
	private Button factoryMethodButton;
	@FXML
	private Button abstractFactoryButton;
	@FXML
	private Button objectAdapterButton;
	@FXML
	private Button classAdapterButton;
	@FXML
	private Button safeCompositeButton;
	@FXML
	private Button consistentCompositeButton;
	@FXML
	private Button hibernateButton;
	
	public void singletonButtonOnClick() {
		new SingletonClient().start(new Stage());
	}
	public void multitonButtonOnClick() {
		new MultipletonClient().start(new Stage());
	}
	public void simpleFactoryMethodButtonOnClick() {
		new simpleFactoryClient().start(new Stage());
	}
	public void abstractFactoryButtonOnClick() {
		new AbstractFactoryClient().start(new Stage());
	}
	public void factoryMethodButtonOnClick() {
		new FactoryClient().start(new Stage());
	}
	public void objectAdapterButtonOnClick() {
		new AdapterClient().start(new Stage());
	}
	public void classAdapterButtonOnClick() {
		new AdapterClient().start(new Stage());
	}
	public void safeCompositeButtonOnClick() {
		new CompositeClient().start(new Stage());
	}
	public void consistentCompositeButtonOnClick() {
		new CompositeClient().start(new Stage());
	}
	public void hibernateButtonOnClick() {
		new HibernateClient().start(new Stage());
	}
	
}
